using System;
using System.Collections.Generic;
using System.Text;
using NUnit.Framework;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;

namespace Utilities
{
    [TestFixture]
    public class SqlConnectionFixture
    {
        private static string cnnCatalogStr;
        [SetUp]
        public void SetUp()
        {
            cnnCatalogStr = ConfigurationManager.ConnectionStrings["Recording_ConnectionString"].ConnectionString;
        }

        [Test]
        public void CanRetriveConnectionString()
        {
            Assert.IsNotNull(cnnCatalogStr);
        }

        [Test]
        public void ConnectionIsOpen()
        {
            SqlConnection cnnCatalog = new SqlConnection(cnnCatalogStr);
            cnnCatalog.Open();
            Assert.AreEqual(ConnectionState.Open, cnnCatalog.State);
            cnnCatalog.Close();

        }

    }
}
